package cn.iocoder.yudao.module.eval.controller.admin.announcement.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;
import java.time.LocalDate;
import java.time.LocalDateTime;

@Schema(description = "管理后台 - 公告发布新增/修改 Request VO")
@Data
public class EvalAnnouncementSaveReqVO {

    @Schema(description = "主键ID", example = "1")
    private Long id;

    @Schema(description = "计划ID", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
    @NotNull(message = "计划ID不能为空")
    private Long planId;

    @Schema(description = "模板ID", example = "1")
    private Long templateId;

    @Schema(description = "公告类型", requiredMode = Schema.RequiredMode.REQUIRED, example = "plan")
    @NotBlank(message = "公告类型不能为空")
    @Size(max = 50, message = "公告类型长度不能超过50个字符")
    private String announcementType;

    @Schema(description = "公告标题", requiredMode = Schema.RequiredMode.REQUIRED, example = "重要通知")
    @NotBlank(message = "公告标题不能为空")
    @Size(max = 200, message = "公告标题长度不能超过200个字符")
    private String title;

    @Schema(description = "公告内容", requiredMode = Schema.RequiredMode.REQUIRED, example = "这是一个重要通知...")
    @NotBlank(message = "公告内容不能为空")
    private String content;

    @Schema(description = "发布渠道", example = "system,website")
    @Size(max = 200, message = "发布渠道长度不能超过200个字符")
    private String publishChannels;

    @Schema(description = "定时发布时间")
    private LocalDateTime scheduledPublishTime;

    @Schema(description = "公示开始日期")
    private LocalDate publicityStartDate;

    @Schema(description = "公示结束日期")
    private LocalDate publicityEndDate;

    @Schema(description = "公示天数", example = "7")
    private Integer publicityDays;

    @Schema(description = "目标受众", example = "all")
    @Size(max = 50, message = "目标受众长度不能超过50个字符")
    private String targetAudience;

    @Schema(description = "目标群体", example = "group1,group2")
    @Size(max = 500, message = "目标群体长度不能超过500个字符")
    private String targetGroups;

}
